<template>
  <div>
    <a
      href="javascript:;"
      class="geolo-btn"
      @click="geoloLocation"
    >定位到当前位置</a>
  </div>
</template>

<script>
import { geolocation } from '@/utils/map'

export default {
  name: 'Geolocation',
  methods: {
    geoloLocation () {
      // this.$loading.show()
      geolocation().then((data) => {
        console.log(data, 'aaaa')
      }).catch(() => {
        // this.$loading.hide()
        this.$message.error('定位失败')
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.geolo-btn {
  @include wh(100%, 70px);
  background: #fff;
  color: #666;
  font-size: 24px;
  line-height: 70px;
  padding: 0 30px;
  box-sizing: border-box;
  margin-top: 40px;
}
</style>
